/**************************************************************************** 
* 
* Copyright (c) 2023  C*Core -   All Rights Reserved  
* 
* THIS SOFTWARE IS DISTRIBUTED "AS IS," AND ALL WARRANTIES ARE DISCLAIMED, 
* INCLUDING MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* 
* PROJECT     : CCFC2011BC           
* DESCRIPTION : adc demo code
* HISTORY     : Initial version.
* @file     adc_demo.h
* @version  1.1
* @date     2023 - 02 - 20
* @brief    Initial version.
*
*****************************************************************************/
#ifndef ADC_DEMO_H_
#define ADC_DEMO_H_
#include "typedefs.h"

/**
* @brief    ADC test case switch.
**/
#define ADC_CASE1               1U
#define ADC_CASE2               0U
#define ADC_CASE3               0U
#define ADC_CASE4               0U
#define ADC_CASE5               0U
#define ADC_CASE6               0U

/**
* @brief    ADC_POWER reference define.
**/
#define ADC_POWER_REF_3V3 1U

#if ADC_POWER_REF_3V3
#define ADC_POWER_REF 3300U
#else
#define ADC_POWER_REF 5000U
#endif
/**
* @brief    ADC_Config define.
**/
#define ADC_ADCLKSEL_0          0U
#define ADC_ADCLKSEL_1          1U
#define ADC_MODE_SCAN           1U
#define ADC_MODE_ONESHOT        0U
#define ADC_OWREN               1U
#define ADC_ACKO                1U
#define ADC_PWDN                0U
#define ADC_PWON                1U
#define ADC_RIGHTALIGNED        0U

/**
* @brief    DMAMUX ChannelConfig source.
**/
#define ADC0_TRIG_SOURCE        29U
#define ADC1_TRIG_SOURCE        30U

/**
* @brief    DMA ChannelNum.
**/
#define ADC_DMA_CHANNEL0        0U
#define ADC_DMA_CHANNEL1        1U
#define ADC_DMA_CHANNEL2        2U
#define ADC_DMA_CHANNEL3        3U


/************************************************************************
 *    Functional declarations
 ************************************************************************/
extern void ADC_Test_Demo(void);

#endif  /* __ADC_DEMO_H_ */
